# name : SQL get all unique combination of two variables/columns
# key : sql.all.unique.comb.vars
# contributor: Shuguang Sun
# --
proc sql noprint;
  create table ${1:dtout} as
    select distinct a.$3 as $3, b.$4 as $4
    from ${2:dtin} (keep = ${3:subjid}) as a, $2 (keep = ${4:visit}) as b
    order by $3, $4;
  quit;
run;